package com.itedge.infrastructure.util;

import org.springframework.security.core.context.SecurityContextHolder;

/**
 * Class designed to return stateful Context objects and data.
 * 
 * @author jhe
 *
 */
public class ContextUtil {
	
	/**
	 * get username of currently logged user.
	 * 
	 * @return username of currently logged user
	 */
	public static String getLoggedUsername() {
		return SecurityContextHolder.getContext().getAuthentication().getName();
	}
	
}
